package br.edu.ufcg.lsd.wbis.ui.client.ui.loggedin.admin.allequips;

import br.edu.ufcg.lsd.wbis.ui.client.beans.EquipInfo;
import br.edu.ufcg.lsd.wbis.ui.client.ui.loggedin.admin.GenericInfoPanel;

/**
 * @author Renato Miceli
 */
public class EquipInfoPanel extends GenericInfoPanel<EquipInfo> {

	public EquipInfoPanel() {

	}

	public EquipInfoPanel(EquipInfo info) {
		updateInfo(info);
	}

	public void updateInfo(EquipInfo currentInfo) {
		this.setHtml("<br><b>Type: " + currentInfo.getType() + "<br>Inventory Code: " + currentInfo.getInventoryCode() + "<br>Model: "
				+ currentInfo.getModel() + "<br>Brand: " + currentInfo.getBrand() + "<br>Localization: " + currentInfo.getLocalization()
				+ "<br>Acquisition Date:  " + currentInfo.getAcqDate() + "<br>Allocable: " + (currentInfo.isAllocable() ? "yes" : "no")
				+ "<br>Available: " + (currentInfo.isAvailable() ? "yes" : "no") + "<br>Serial Code: " + currentInfo.getSerialCode() + "</b><br>");
	}

}
